import 'package:flutter/material.dart';

class HomePage extends StatefulWidget {
  HomePage({Key key}) : super(key: key);

  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('主页')
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            RaisedButton(
              child: Text('国际化'),
              onPressed: () => Navigator.pushNamed(context, '/international')
            ),
            SizedBox(height: 20),
            RaisedButton(
              child: Text('即时通讯'),
              onPressed: () => Navigator.pushNamed(context, '/socket')
            )

          ]
        )
      )
    );
  }
}